package org.demoth.arkanoid;

/**
 * Created by IntelliJ IDEA.
 * User: daniil
 * Date: 20.05.11
 * Time: 22:34
 * To change this template use File | Settings | File Templates.
 */
/*Implementation may be "player.score += amount". LivePowerup is pretty similar.*/
public class ScorePowerup extends GameObject implements Item {
    public int amount;

    /**
     * gently falls down
     */
    ScorePowerup() {
        this.amount = 5;
        this.vy = -10;
    }

    public ScorePowerup(int amount) {
        super();
        this.amount = amount;
    }

    public void affect(Player player) {
        player.score += amount;
    }

    public void update(float time) {
        x += vx * time;
    }

}